package site

import (
	"sensitives/databases/mysql"
)

type SensitiveSys struct {
	Word  string `gorm:"type:varchar(50);unique_index"`
	Level uint8  `gorm:"type:tinyint(1)`
}

func (SensitiveSys) TableName() string {
	return "sensitive_filter"
}

func GetSysWords(site int) []SensitiveSys {
	syswords := make([]SensitiveSys, 0)
	db, err := mysql.GetSiteConnection(site)
	if err != nil {
		return syswords
	}
	db.Find(&syswords)
	return syswords
}
